\doxysection{C\+:/\+Users/\+ASUS/\+Desktop/dm-\/ctrl\+H7-\/balance-\/9025test/modules/algorithm/\+Quaternion\+EKF.h File Reference}
\hypertarget{_quaternion_e_k_f_8h}{}\label{_quaternion_e_k_f_8h}\index{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/modules/algorithm/QuaternionEKF.h@{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/modules/algorithm/QuaternionEKF.h}}


attitude update with gyro bias estimate and chi-\/square test  


{\ttfamily \#include "{}kalman\+\_\+filter.\+h"{}}\newline
\doxysubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{struct_q_e_k_f___i_n_s__t}{QEKF\+\_\+\+INS\+\_\+t}}
\end{DoxyCompactItemize}
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{_quaternion_e_k_f_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}}~1
\item 
\#define \mbox{\hyperlink{_quaternion_e_k_f_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}}~0
\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{_quaternion_e_k_f_8h_a43fed4fb5cef743a036ceb866de43628}{IMU\+\_\+\+Quaternion\+EKF\+\_\+\+Init}} (float \texorpdfstring{$\ast$}{*}init\+\_\+quaternion, float process\+\_\+noise1, float process\+\_\+noise2, float measure\+\_\+noise, float lambda, float lpf)
\begin{DoxyCompactList}\small\item\em Quaternion EKF initialization and some reference value. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{_quaternion_e_k_f_8h_aae827fb4d03a3d115e6ad61501dda590}{IMU\+\_\+\+Quaternion\+EKF\+\_\+\+Update}} (float gx, float gy, float gz, float ax, float ay, float az, float dt)
\begin{DoxyCompactList}\small\item\em Quaternion EKF update. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{_quaternion_e_k_f_8h_a2f6ee130c2912fa1106128c97aa54d69}\label{_quaternion_e_k_f_8h_a2f6ee130c2912fa1106128c97aa54d69} 
\mbox{\hyperlink{struct_q_e_k_f___i_n_s__t}{QEKF\+\_\+\+INS\+\_\+t}} {\bfseries QEKF\+\_\+\+INS}
\item 
\Hypertarget{_quaternion_e_k_f_8h_a2e0e191413114f9d3d801199ae634c1f}\label{_quaternion_e_k_f_8h_a2e0e191413114f9d3d801199ae634c1f} 
float {\bfseries chi\+Square}
\item 
\Hypertarget{_quaternion_e_k_f_8h_a2ecd12f4d1bb02708ce10df387787007}\label{_quaternion_e_k_f_8h_a2ecd12f4d1bb02708ce10df387787007} 
float {\bfseries Chi\+Square\+Test\+Threshold}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
attitude update with gyro bias estimate and chi-\/square test 

\begin{DoxyAuthor}{Author}
Wang Hongxi 
\end{DoxyAuthor}
\begin{DoxyVersion}{Version}
V1.\+2.\+0 
\end{DoxyVersion}
\begin{DoxyDate}{Date}
2022/3/8 
\end{DoxyDate}
\begin{DoxyAttention}{Attention}

\end{DoxyAttention}


\label{doc-define-members}
\Hypertarget{_quaternion_e_k_f_8h_doc-define-members}
\doxysubsection{Macro Definition Documentation}
\Hypertarget{_quaternion_e_k_f_8h_aa93f0eb578d23995850d61f7d61c55c1}\index{QuaternionEKF.h@{QuaternionEKF.h}!FALSE@{FALSE}}
\index{FALSE@{FALSE}!QuaternionEKF.h@{QuaternionEKF.h}}
\doxysubsubsection{\texorpdfstring{FALSE}{FALSE}}
{\footnotesize\ttfamily \label{_quaternion_e_k_f_8h_aa93f0eb578d23995850d61f7d61c55c1} 
\#define FALSE~0}

boolean fails \Hypertarget{_quaternion_e_k_f_8h_aa8cecfc5c5c054d2875c03e77b7be15d}\index{QuaternionEKF.h@{QuaternionEKF.h}!TRUE@{TRUE}}
\index{TRUE@{TRUE}!QuaternionEKF.h@{QuaternionEKF.h}}
\doxysubsubsection{\texorpdfstring{TRUE}{TRUE}}
{\footnotesize\ttfamily \label{_quaternion_e_k_f_8h_aa8cecfc5c5c054d2875c03e77b7be15d} 
\#define TRUE~1}

boolean true 

\label{doc-func-members}
\Hypertarget{_quaternion_e_k_f_8h_doc-func-members}
\doxysubsection{Function Documentation}
\Hypertarget{_quaternion_e_k_f_8h_a43fed4fb5cef743a036ceb866de43628}\index{QuaternionEKF.h@{QuaternionEKF.h}!IMU\_QuaternionEKF\_Init@{IMU\_QuaternionEKF\_Init}}
\index{IMU\_QuaternionEKF\_Init@{IMU\_QuaternionEKF\_Init}!QuaternionEKF.h@{QuaternionEKF.h}}
\doxysubsubsection{\texorpdfstring{IMU\_QuaternionEKF\_Init()}{IMU\_QuaternionEKF\_Init()}}
{\footnotesize\ttfamily \label{_quaternion_e_k_f_8h_a43fed4fb5cef743a036ceb866de43628} 
void IMU\+\_\+\+Quaternion\+EKF\+\_\+\+Init (\begin{DoxyParamCaption}\item[{float \texorpdfstring{$\ast$}{*}}]{init\+\_\+quaternion}{, }\item[{float}]{process\+\_\+noise1}{, }\item[{float}]{process\+\_\+noise2}{, }\item[{float}]{measure\+\_\+noise}{, }\item[{float}]{lambda}{, }\item[{float}]{lpf}{}\end{DoxyParamCaption})}



Quaternion EKF initialization and some reference value. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{in}}  & {\em process\+\_\+noise1} & quaternion process noise 10 \\
\hline
\mbox{\texttt{in}}  & {\em process\+\_\+noise2} & gyro bias process noise 0.\+001 \\
\hline
\mbox{\texttt{in}}  & {\em measure\+\_\+noise} & accel measure noise 1000000 \\
\hline
\mbox{\texttt{in}}  & {\em lambda} & fading coefficient 0.\+9996 \\
\hline
\mbox{\texttt{in}}  & {\em lpf} & lowpass filter coefficient 0 \\
\hline
\end{DoxyParams}
\Hypertarget{_quaternion_e_k_f_8h_aae827fb4d03a3d115e6ad61501dda590}\index{QuaternionEKF.h@{QuaternionEKF.h}!IMU\_QuaternionEKF\_Update@{IMU\_QuaternionEKF\_Update}}
\index{IMU\_QuaternionEKF\_Update@{IMU\_QuaternionEKF\_Update}!QuaternionEKF.h@{QuaternionEKF.h}}
\doxysubsubsection{\texorpdfstring{IMU\_QuaternionEKF\_Update()}{IMU\_QuaternionEKF\_Update()}}
{\footnotesize\ttfamily \label{_quaternion_e_k_f_8h_aae827fb4d03a3d115e6ad61501dda590} 
void IMU\+\_\+\+Quaternion\+EKF\+\_\+\+Update (\begin{DoxyParamCaption}\item[{float}]{gx}{, }\item[{float}]{gy}{, }\item[{float}]{gz}{, }\item[{float}]{ax}{, }\item[{float}]{ay}{, }\item[{float}]{az}{, }\item[{float}]{dt}{}\end{DoxyParamCaption})}



Quaternion EKF update. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{in}}  & {\em gyro} & x y z in rad/s \\
\hline
\mbox{\texttt{in}}  & {\em accel} & x y z in m/s² \\
\hline
\mbox{\texttt{in}}  & {\em update} & period in s \\
\hline
\end{DoxyParams}
